Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AUT-1432: Fix secret key display in error state and tests #1632

Merged
merged 1 commit into from
May 22, 2024

Conversation

gtvj
Copy link
Contributor

@gtvj gtvj commented May 20, 2024

What

Fixes a bug reported by QA where authenticator app secret keys were not displayed following a validation error.

The fix ensures the secret will display both:

  • where the code format is invalid and therefore fails the validation rules as set in setup-authenticator-app-validation.ts
  • where the code is incorrect, as demonstrated by the verifyMfaCode service not returning a success

The related integration tests have also been updated to prevent assertions passing where the code is not included (the previous non-empty test would always pass because the text included whitespace and line break characters)

How to review

  1. Code Review
  2. Run this branch locally
  3. Go through an account creation journey choosing authenticator app when asked to choose a method for second factor.
  4. On the "Set up an authenticator app" screen confirm that the secret key can be seen when expanding "I cannot scan the QR code"
  5. Confirm that the secret key is still included in error states when you submit different permutations of invalid formats. This includes: not entering a code; entering a code that is too long; entering a six digit code that contains a letter
  6. Confirm that the secret key is still included when you enter a valid code that is incorrect.
  7. Confirm that a correct code can be submitted

@gtvj gtvj force-pushed the AUT-1432/fix-secret-key-display-in-error-state branch from 2d7f023 to 0048d3c Compare May 20, 2024 10:13
This fixes a bug reported by QA where authenticator app secret
keys were not displayed following a validation error.

The fix ensures the secret will display both:

- where the code format is invalid and therefore fails
  the validation rules as set in setup-authenticator-app-validation.ts
- where the code is incorrect, as demonstrated by the verifyMfaCode
  service not returning a success

The related integration tests have also been updated to prevent
passing where the code is not included (the previous non-empty test
would always pass because the text included whitespace and line breaks)
@gtvj gtvj force-pushed the AUT-1432/fix-secret-key-display-in-error-state branch from 0048d3c to 71067bd Compare May 20, 2024 10:17
@gtvj gtvj marked this pull request as ready for review May 20, 2024 11:29
@gtvj gtvj requested review from a team as code owners May 20, 2024 11:29
@gtvj gtvj merged commit b2c75d6 into main May 22, 2024
4 checks passed
@gtvj gtvj deleted the AUT-1432/fix-secret-key-display-in-error-state branch May 22, 2024 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants